package czk.jvm.lecture.alibaba;



public class Animal {

    private String name;
    public void init(){
        System.out.println("init执行了");
        this.name="狗";
    }
    public Animal(){
        init();
    }
    // new 出来的对象不能访问
    private void test(){}
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void main(String[] args) {
        Animal animal=new Animal();
        System.out.println(animal.getName());
    }

}
